/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.subway.utilitarios;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import org.primefaces.event.CloseEvent;

/**
 *
 * @author Héctor <UFG>
 */
@ManagedBean (name="dialogBean")
@SessionScoped
public class DialogBean {

    public void handleClose(CloseEvent event) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,
                event.getComponent().getId() + " cerrada", "Ok, puedes seguir eligiendo!");

        facesContext.addMessage(null, message);
    }
}
